home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
tvcolor.exe
/
TDEMO.HPP
< prev
Wrap
C/C++ Source or Header
|
1992-06-27
|
3KB
|
73 lines
/*-----------------------------------------------------------------------*/
/* filename - tdemo.hpp */
/* */
/* function(s) */
/* declarations for the TDemo class */
/* */
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
/* */
/* TDEMO.HPP */
/* */
/* Copyright (C) 1992 Michael Newton and Comsoft Software */
/* All Rights Reserved. */
/* */
/*-----------------------------------------------------------------------*/
#if !defined __TDEMO_HPP
#define __TDEMO_HPP
class far TApplication;
class far TEvent;
class far TMenubar;
class far TPalette;
class far TRect;
class far TStatusLine;
class far TStaticText;
class far TView;
// Event commands
const ushort cmAbout = 5000,
cmColors = 5001,
cmSavPal = 5002,
cmNone = 0;
// Key codes
const ushort kbNone = kbNoKey;
// Help contexts
const ushort hcColors = 5000,
hcNone = hcNoContext;
class TDemo : public TApplication
{
public:
TDemo();
virtual ~TDemo();
static TStatusLine *initStatusLine(TRect);
static TMenuBar *initMenuBar(TRect);
virtual void handleEvent(TEvent& Event);
private:
static const char * near configFile; // Configuration filename
char currentPattern; // Current pattern character
ushort patternButtons; // Pattern radiobuttons
Boolean saveDesk(); // Save desktop
Boolean restoreDesk(); // Restore desktop
void about(); // About box
void colors(); // TVColorDialog box
void storeDesk(fpstream& strm); // Write desktop to stream
void loadDesk(fpstream& strm); // Read desktop from stream
void writePalette(const char *path); // Save current palette
};
static void writeView(TView *v, void *strm);
static void closeView(TView *v, void *p);
ushort execDialog(TDialog *d, void *data);
Boolean confirmExit();
#endif // End of __TDEMO_HPP